package com.czbank.financing.controller;

import com.czbank.financing.Entity.Account;
import com.czbank.financing.service.SelectAccountService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
@Api("测试api")
@RequestMapping("/Account")
public class AccountControl {
    @Autowired
    private SelectAccountService selectAccountService;


    @RequestMapping("/SelectOneAccount")
    public Object UserInfoOne(long id){
        return selectAccountService.selectAccountById(id);

    }

    @ApiOperation(value = "综合查询", notes = "根据多项条件进行查询")
    @RequestMapping(value = "/search/list/multipleSelect", method = RequestMethod.GET)
    @ResponseBody
    public List<Account> acountList(){

        return selectAccountService.selectAccountList();

    }

}
